@extends('admin.layout.main')
@section('content')
<link rel="stylesheet" href="{{asset('/adminlte/plugins/datepicker/datepicker3.css')}}">
 <section class="content-header">
  <h1>
    消息记录
  </h1>
  <ol class="breadcrumb">
    <li><a href="javascript:void(0)"><i class="fa fa-dashboard"></i> 公众号消息</a></li>
    <li class="active">消息记录</li>
  </ol>
</section>
<section class="content">
    <!-- Small boxes (Stat box) -->
    <div class="row">
    	<div class="col-md-12">
            <div class="dataTables_filter">
                <form action="" method="GET">
                    <button type="submit" class="btn btn-info btn-sm">查询:</button><input type="text" name="time" class="form-control input-sm" id="datepicker" value="{{$now}}">
                </form>
            </div>
          	<ul class="timeline">
	            <!-- timeline time label -->
	            <li class="time-label">
	                  <span class="bg-green">
              			{{$now}}
	                  </span>
	            </li>
	            <!-- /.timeline-label -->
          		@foreach($logs as $log)
		            <!-- timeline item -->
		            <li>
		              <i class="fa fa-envelope bg-blue"></i>

		              <div class="timeline-item">
		                <span class="time"><i class="fa fa-clock-o"></i> {{$log->created_at}}</span>

		                <h3 class="timeline-header"><a href="javascript:void(0)">@if($log->type == 1) 循环推送 @elseif($log->type == 2) 定时推送 @endif</a></h3>

		                <div class="timeline-body">
		                	{!! $log->raw_content !!}
		                </div>
		                <div class="timeline-footer">
		                  <!-- <a class="btn btn-danger btn-xs">删除</a> -->
		                </div>
		              </div>
		            </li>
	            @endforeach
	            <!-- end -->
	            <li>
	              <i class="fa fa-clock-o bg-gray"></i>
	            </li>
        	</ul>
    	</div>
    </div>
</section>
<script src="{{asset('/adminlte/plugins/datepicker/bootstrap-datepicker.js')}}"></script>
<script type="text/javascript">
	//Date picker
    $('#datepicker').datepicker({
      autoclose: true
    });
</script>
@endsection